package com.weblog.upload.client;


import com.weblog.upload.client.factory.UserFallBackFactory;
import com.weblog.upload.interceptor.FeignInterceptor;
import entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;


/**
 * @author MaoLin Wang
 * @date 2019/9/2215:37
 */
@FeignClient(value = "weblog-user",fallbackFactory = UserFallBackFactory.class,configuration = FeignInterceptor.class)
public interface UserClient {

    /**
     * 上传/修改头像
     * @param url
     * @return
     */
    @PutMapping("user/client/upload")
     Result uploadAvatar(@RequestParam(value = "url") String url);

    /**
     * 查询当前用户头像
     * @param
     * @return
     */
    @GetMapping("user/client/avatar/{id}")
     Result findAvatarById(@PathVariable("id")String id);
}
